package compi2.practica1.client.screen;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.user.client.ui.PasswordTextBox;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DecoratorPanel;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;

public class LoginScreen extends Composite {

	public LoginScreen() {
		
		VerticalPanel verticalPanel = new VerticalPanel();
		initWidget(verticalPanel);
		
		Label lblNewLabel_5 = new Label("Derivador Matemático");
		verticalPanel.add(lblNewLabel_5);
		verticalPanel.setCellVerticalAlignment(lblNewLabel_5, HasVerticalAlignment.ALIGN_BOTTOM);
		verticalPanel.setCellHorizontalAlignment(lblNewLabel_5, HasHorizontalAlignment.ALIGN_CENTER);
		
		DecoratorPanel decoratorPanel = new DecoratorPanel();
		verticalPanel.add(decoratorPanel);
		verticalPanel.setCellVerticalAlignment(decoratorPanel, HasVerticalAlignment.ALIGN_MIDDLE);
		verticalPanel.setCellHorizontalAlignment(decoratorPanel, HasHorizontalAlignment.ALIGN_CENTER);
		
		VerticalPanel verticalPanel_1 = new VerticalPanel();
		verticalPanel_1.setSpacing(5);
		decoratorPanel.setWidget(verticalPanel_1);
		
		Label lblNewLabel = new Label("NPN");
		verticalPanel_1.add(lblNewLabel);
		
		HorizontalPanel horizontalPanel = new HorizontalPanel();
		verticalPanel_1.add(horizontalPanel);
		
		ListBox cboYear = new ListBox();
		horizontalPanel.add(cboYear);
		cboYear.addItem("2000");
		cboYear.addItem("2001");
		cboYear.addItem("2002");
		cboYear.addItem("2003");
		cboYear.addItem("2004");
		cboYear.addItem("2005");
		cboYear.addItem("2006");
		cboYear.addItem("2007");
		cboYear.addItem("2008");
		cboYear.addItem("2009");
		cboYear.addItem("2010");
		cboYear.addItem("2011");
		cboYear.addItem("2012");
		cboYear.addItem("2013");
		cboYear.setSelectedIndex(13);
		cboYear.setWidth("80px");
		
		Label lblNewLabel_1 = new Label("-");
		horizontalPanel.add(lblNewLabel_1);
		horizontalPanel.setCellVerticalAlignment(lblNewLabel_1, HasVerticalAlignment.ALIGN_MIDDLE);
		
		ListBox cboCycle = new ListBox();
		horizontalPanel.add(cboCycle);
		cboCycle.addItem("01");
		cboCycle.addItem("02");
		cboCycle.addItem("03");
		cboCycle.addItem("04");
		cboCycle.addItem("05");
		cboCycle.setWidth("60px");
		
		Label lblNewLabel_2 = new Label("-");
		horizontalPanel.add(lblNewLabel_2);
		horizontalPanel.setCellVerticalAlignment(lblNewLabel_2, HasVerticalAlignment.ALIGN_MIDDLE);
		
		TextBox txtSection = new TextBox();
		horizontalPanel.add(txtSection);
		txtSection.setWidth("50px");
		
		Label lblNewLabel_3 = new Label("-");
		horizontalPanel.add(lblNewLabel_3);
		horizontalPanel.setCellVerticalAlignment(lblNewLabel_3, HasVerticalAlignment.ALIGN_MIDDLE);
		
		TextBox txtCode = new TextBox();
		horizontalPanel.add(txtCode);
		txtCode.setWidth("75px");
		
		Label lblNewLabel_4 = new Label("Password");
		verticalPanel_1.add(lblNewLabel_4);
		
		PasswordTextBox txtPassword = new PasswordTextBox();
		verticalPanel_1.add(txtPassword);
		
		Button btnLogin = new Button("New button");
		verticalPanel_1.add(btnLogin);
		btnLogin.setText("Login");
	}

}
